<template>
  <div class="phone-container">
    <el-form :model="phoneForm" label-width="70px" :rules="phoneFormRules">
      <el-form-item label="手机号" prop="phone">
        <el-input v-model="phoneForm.phone" />
      </el-form-item>
      <el-form-item label="验证码" prop="code">
        <el-input v-model="phoneForm.code" class="password-input" />
        <el-button type="primary" class="get-code">获取验证码</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script lang="ts">
import { defineComponent, reactive } from 'vue'
import { phoneFormRules } from '../rules/index'
export default defineComponent({
  name: 'LoginPhone',
  setup() {
    const phoneForm = reactive({
      phone: '',
      code: ''
    })
    return {
      phoneFormRules,
      phoneForm
    }
  }
})
</script>
<style scoped lang="less">
.get-code {
  margin-left: 19px;
}
.password-input {
  width: 59%;
}
</style>
